<template>
  <ant-modal
    modalWidth="576"
    modalHeight="500"
    :visible="open"
    :modal-title="formTitle"
    :adjust-size="true"
    @cancel="cancel"
  >
    <a-form-model ref="form" :model="form" :rules="rules" slot="content" layout="vertical">
      <a-row :gutter="32">
        <a-col :span="12">
          <a-form-model-item label="报表名称" prop="rname">
            <a-input v-model="form.rname" placeholder="请输入报表名称"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="报表编码" prop="rcode">
            <a-input v-model="form.rcode" placeholder="请输入报表编码"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="报表分组" prop="rgroup">
            <a-input v-model="form.rgroup" placeholder="请输入报表分组"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="报表类型" prop="rtype">
            <s-select v-model="form.rtype" dictCode="rtypes" placeholder="请选择报表类型"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="24">
          <a-form-model-item label="报表缩略图" prop="rimage">
            <s-upload v-model="form.rimage" fileType="image" :number="1"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="24">
          <a-form-model-item label="报表描述" prop="rdesc">
            <a-textarea v-model="form.rdesc" placeholder="请输入报表描述" :auto-size="{ minRows: 6, maxRows: 6 }"/>
          </a-form-model-item>
        </a-col>
      </a-row>
    </a-form-model>
    <template slot="footer">
      <a-button :disabled="disabled" @click="cancel">
        取消
      </a-button>
      <a-button type="primary" :disabled="disabled" @click="submitForm(true)">
        保存
      </a-button>
    </template>
  </ant-modal>
</template>
<script>
import ReportAddForm from './ReportForm'
export default {
  ...ReportAddForm
}
</script>
